﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.IO;
using Yz.Core.Extensions;
using Yz.Model.Dal;

namespace Yz.Manage.Controllers
{
    public class AccountController : BaseWebController
    {
        public YzContext _yzContext { get; set; }
        [AllowAnonymous]
        public FileResult Index()
        { 
            var aa = _yzContext.GetDbDicNPOIExcel(Path.Combine(AppContext.BaseDirectory, "Yz.Model.xml"));
            return ExportExcel(aa); 
        }

        public IActionResult Login()
        {
            return View();
        }
    }
}
